package com.wjhs.redispractice.repeatsubmit.controller;

import com.wjhs.redispractice.repeatsubmit.annotation.RepeatSubmit;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
public class RepeatSubmitController {

    @RequestMapping ("/users/save")
    @RepeatSubmit(serviceId = "saveUser", limitType = RepeatSubmit.Type.PARAM, lockTime = 5)
    public String saveUser(String name) {
        return "success";
    }
}
